1. Field of the Invention
This invention pertains to a system for statically allocating a memory for use in a computer system capable of efficiently allocating a memory necessary for executing FORTRAN programs, etc.
A super computer for high speed program execution using pipeline processing or parallel processing requires that a program and the entire data referred to by the program be stored in its memory during the program execution. An efficient memory allocation technique is therefore sought.
2. Description of the Related Art
When a user program for scientific or technological calculations is run, if the memory for storing the program and the necessary data are deficient, it is necessary to interrupt the operation of other programs being executed to make additional memory available by swapping out the interrupted program onto an external memory device.
However, the volume of data handled by a super computer is generally huge and an overhead caused by the swapping is more severe than that caused by such swapping in a general-purpose computer. Also, since a super computer is expected to provide high speed performance, the overhead caused by the swapping must be avoided in every way possible.
A static memory allocation method is effective in preventing the overhead caused by such swapping, whereby the maximum memory volume deemed necessary for executing a program to be run is allocated in advance and the memory is kept allocated until the program execution is ended.
Since this method allows programs to be executed with the necessary memory already allocated beforehand, no memory deficiency occurs while the programs are being executed, and the overhead produced by swapping can be avoided. However, since the memory is kept allocated, the memory usage efficiencies are lowered.
On the other hand, a dynamic memory allocation method is defined as a method whereby requested memory is allocated only when a memory request is made, thus generally creating no idle portions of memory. Yet, since overhead produced by swapping cannot be avoided when multiple programs are run concurrently, it is not effective to apply this method to a super computer system.
FIG. 1 shows an example of the prior art for static memory allocation.
Generally, a user specifies the memory volume kept allocated by job control statements 21 using a conventional static memory allocation method.
The following is a description of a memory allocation method of the prior art by referring to the steps [1] through [6] shown in FIG. 1.
1 A job management section 22 interprets the specification on the volume of memory allocation described in the job control statement 21.
2 The job management section 22 notifies a memory management section 15 of the interpreted volume of memory allocation.
3 The memory management section 15 allocates the specified volume of memory 23.
4 The memory management section 15 notifies the job management section 22 of the completion of allocating the memory 23.
5 The job management section 22 calls up a loader 14 when the environment for executing the job is complete.
6 The loader 14 loads an executable program 13 into the memory 23.
After the loading, the program is initialized and the program execution begins.
A user needs to precisely estimate the memory volume necessary for program execution for an efficient memory allocation, when he utilizes the conventional static memory allocation method.
However, it is difficult to correctly estimate the memory volume necessary for the program execution. Because the precise estimation is difficult, in order to avoid abnormally terminating a program execution because of a memory deficiency, the user often specifies a memory volume larger than necessary. Therefore, less of the memory allocated for the program is actually used and the memory usage efficiency tends to be lowered.
FIG. 2 shows an example of a time series change in the memory volume allocated for a program using the conventional static memory allocation.
In FIG. 2, the part with slashes indicates the actually used memory volume. However, the memory volume specified by a user is kept allocated to the program from where the program execution is requested until the program execution is completed irrespective of the actually used volume. This causes an increase in the volume of idle memory, which could have been allocated for other programs running concurrently, resulting in a decrease in the number of jobs which can be executed simultaneously.